home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 32 / Mac Magazin and MacEasy Magazine CD - Issue 32.iso / Grafik & Text / OzTeX3.0 / TeX-inputs / LaTeX / base / tracefnt.sty < prev    next >
Text File  |  1997-03-07  |  10KB  |  288 lines

  1. %%
  2. %% This is file `tracefnt.sty',
  3. %% generated with the docstrip utility.
  4. %%
  5. %% The original source files were:
  6. %%
  7. %% ltfsstrc.dtx  (with options: `package,trace')
  8. %% 
  9. %% This is a generated file.
  10. %% 
  11. %% Copyright 1993 1994 1995 1996 1997
  12. %% The LaTeX3 Project and any individual authors listed elsewhere
  13. %% in this file.
  14. %% 
  15. %% For further copyright information, and conditions for modification
  16. %% and distribution, see the file legal.txt, and any other copyright
  17. %% notices in this file.
  18. %% 
  19. %% This file is part of the LaTeX2e system.
  20. %% ----------------------------------------
  21. %%   This system is distributed in the hope that it will be useful,
  22. %%   but WITHOUT ANY WARRANTY; without even the implied warranty of
  23. %%   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  24. %% 
  25. %%   For error reports concerning UNCHANGED versions of this file no
  26. %%   more than one year old, see bugs.txt.
  27. %% 
  28. %%   Please do not request updates from us directly.  Primary
  29. %%   distribution is through the CTAN archives.
  30. %% 
  31. %% 
  32. %% IMPORTANT COPYRIGHT NOTICE:
  33. %% 
  34. %% You are NOT ALLOWED to distribute this file alone.
  35. %% 
  36. %% You are allowed to distribute this file under the condition that it
  37. %% is distributed together with all the files listed in manifest.txt.
  38. %% 
  39. %% If you receive only some of these files from someone, complain!
  40. %% 
  41. %% 
  42. %% Permission is granted to copy this file to another file with a
  43. %% clearly different name and to customize the declarations in that
  44. %% copy to serve the needs of your installation, provided that you
  45. %% comply with the conditions in the file legal.txt.
  46. %% 
  47. %% However, NO PERMISSION is granted to generate or to distribute a
  48. %% modified version of this file under its original name.
  49. %% 
  50. %% You are NOT ALLOWED to change this file.
  51. %% 
  52. %% 
  53. %% MODIFICATION ADVICE:
  54. %% 
  55. %% If you want to customize this file, it is best to make a copy of
  56. %% the source file(s) from which it was produced.  Use a different
  57. %% name for your copy(ies) and modify the copy(ies); this will ensure
  58. %% that your modifications do not get overwritten when you install a
  59. %% new release of the standard system.  You should also ensure that
  60. %% your modified source file does not generate any modified file with
  61. %% the same name as a standard file.
  62. %% 
  63. %% You can then easily distribute your modifications by distributing
  64. %% the modified and renamed copy of the source file, taking care to
  65. %% observe the conditions in legal.txt; this will ensure that other
  66. %% users can safely use your modifications.
  67. %% 
  68. %% You will also need to produce your own, suitably named, .ins file to
  69. %% control the generation of files from your source file; this file
  70. %% should contain your own preambles for the files it generates, not
  71. %% those in the standard .ins files.
  72. %% 
  73. %% The names of the source files used are shown above.
  74. %% 
  75. %% 
  76. %% 
  77. %%% From File: ltfsstrc.dtx
  78. %% Copyright (C) 1989-96 by Frank Mittelbach and Rainer Sch\"opf.
  79. %% Copyright (C) 1994-96 by LaTeX3 project. All rights reserved.
  80. \NeedsTeXFormat{LaTeX2e}[1995/05/16]
  81. \ProvidesPackage{tracefnt}
  82.      [1996/07/26 v3.0i  Standard LaTeX package (font tracing)]
  83. \newcount\tracingfonts
  84. \tracingfonts=0
  85. \DeclareOption{errorshow}{%
  86.    \def\@font@info#1{%
  87.          \GenericInfo{(Font)\@spaces\@spaces\@spaces\space\space}%
  88.                      {LaTeX Font Info: \space\space\space#1}}%
  89.     \def\@font@warning#1{%
  90.          \GenericInfo{(Font)\@spaces\@spaces\@spaces\space\space}%
  91.                         {LaTeX Font Warning: #1}}%
  92.      }
  93. \DeclareOption{warningshow}{%
  94.    \def\@font@info#1{%
  95.          \GenericInfo{(Font)\@spaces\@spaces\@spaces\space\space}%
  96.                      {LaTeX Font Info: \space\space\space#1}}%
  97.     \def\@font@warning#1{%
  98.          \GenericWarning{(Font)\@spaces\@spaces\@spaces\space\space}%
  99.                         {LaTeX Font Warning: #1}}%
  100.      }
  101. \DeclareOption{infoshow}{%
  102.    \def\@font@info#1{%
  103.          \GenericWarning{(Font)\@spaces\@spaces\@spaces\space\space}%
  104.                      {LaTeX Font Info: \space\space\space#1}}%
  105.     \def\@font@warning#1{%
  106.          \GenericWarning{(Font)\@spaces\@spaces\@spaces\space\space}%
  107.                         {LaTeX Font Warning: #1}}%
  108.      }
  109. \DeclareOption{loading}{%
  110.     \tracingfonts\tw@
  111.    }
  112. \DeclareOption{debugshow}{%
  113.     \ExecuteOptions{infoshow}%
  114.     \tracingfonts\thr@@
  115.    }
  116. \DeclareOption{pausing}{%
  117.     \def\@font@warning#1{%
  118.       \GenericError
  119.              {(Font)\@spaces\@spaces\@spaces\space\space}%
  120.              {LaTeX Font Warning: #1}%
  121.              {See the LaTeX Companion for details.}%
  122.              {I'll stop for every LaTeX Font Warning because
  123.               you requested\\the `pausing' option
  124.               to the tracefnt package.}}%
  125.    }
  126. \ExecuteOptions{infoshow}
  127. \ProcessOptions
  128. \def\extract@font{%
  129.    \get@external@font
  130.    \global\expandafter\font\font@name\external@font\relax
  131.     \ifnum \tracingfonts >\@ne
  132.     \@font@info{External font `\external@font'
  133.               loaded as\MessageBreak \font@name}\fi
  134.     \font@name \relax
  135.     \csname \f@encoding+\f@family\endcsname
  136.     \csname\curr@fontshape\endcsname
  137.     \relax
  138.        }
  139. \DeclareRobustCommand\selectfont
  140.         {%
  141.     \ifx\f@linespread\baselinestretch \else
  142.       \set@fontsize\baselinestretch\f@size\f@baselineskip \fi
  143.     \xdef\font@name{%
  144.       \csname\curr@fontshape/\f@size\endcsname}%
  145.     \pickup@font
  146.     \font@name
  147.     \ifnum \tracingfonts>\tw@
  148.       \@font@info{Switching to \font@name}\fi
  149.     \size@update
  150.     \enc@update
  151.     }
  152. \def\set@fontsize#1#2#3{%
  153.     \@defaultunits\@tempdimb#2pt\relax\@nnil
  154.     \edef\f@size{\strip@pt\@tempdimb}%
  155.     \@defaultunits\@tempskipa#3pt\relax\@nnil
  156.     \edef\f@baselineskip{\the\@tempskipa}%
  157.     \edef\f@linespread{#1}%
  158.     \let\baselinestretch\f@linespread
  159.       \def\size@update{%
  160.         \baselineskip\f@baselineskip\relax
  161.         \baselineskip\f@linespread\baselineskip
  162.         \normalbaselineskip\baselineskip
  163.         \setbox\strutbox\hbox{%
  164.           \vrule\@height.7\baselineskip
  165.                 \@depth.3\baselineskip
  166.                 \@width\z@}%
  167.    \ifnum \tracingfonts>\tw@
  168.       \ifx\f@linespread\@empty
  169.         \let\reserved@a\@empty
  170.       \else
  171.         \def\reserved@a{\f@linespread x}%
  172.       \fi
  173.       \@font@info{Changing size to \f@size/\reserved@a
  174.                 \f@baselineskip}%
  175.       \aftergroup\type@restoreinfo \fi
  176.         \let\size@update\relax}%
  177.   }
  178. \let\size@update\relax
  179.    \def\type@restoreinfo{%
  180.       \ifx\f@linespread\@empty
  181.         \let\reserved@a\@empty
  182.       \else
  183.         \def\reserved@a{\f@linespread x}%
  184.       \fi
  185.       \@font@info{Restoring size to
  186.                 \f@size/\reserved@a\f@baselineskip}}
  187. \def\glb@settings{%
  188.      \expandafter\ifx\csname S@\f@size\endcsname\relax
  189.        \calculate@math@sizes
  190.      \fi
  191.      \csname S@\f@size\endcsname
  192.      \ifmath@fonts
  193.        \ifnum \tracingfonts>\tw@
  194.          \@font@info{Setting up math fonts for
  195.                      \f@size/\f@baselineskip}\fi
  196.        \begingroup
  197.          \escapechar\m@ne
  198.          \csname mv@\math@version \endcsname
  199.          \globaldefs\@ne
  200.          \math@fonts
  201.          \let \glb@currsize \f@size
  202.        \endgroup
  203.         \the\every@math@size
  204.        \else
  205.          \ifnum \tracingfonts>\tw@
  206.            \@font@info{No math setup for
  207.                        \f@size/\f@baselineskip}\fi
  208.      \fi
  209. }
  210. \def\check@mathfonts{%
  211.   \ifx \glb@currsize \f@size
  212.     \ifnum \tracingfonts>\thr@@
  213.         \@font@info{*** MATH: no change \f@size\space
  214.          curr/global (\curr@math@size/\glb@currsize)}\fi
  215.   \else
  216.     \ifnum \tracingfonts>\thr@@
  217.         \@font@info{*** MATH: setting up \f@size\space
  218.          curr/global (\curr@math@size/\glb@currsize)}\fi
  219.      \glb@settings
  220.      \init@restore@glb@settings
  221.   \fi
  222.   \let\curr@math@size\f@size
  223.   \def\init@restore@glb@settings{\aftergroup\restglb@settings}%
  224. }
  225. \def\init@restore@glb@settings{%
  226.        \ifnum \tracingfonts>\thr@@
  227.         \@font@info{*** MATH: no resetting (not in
  228.                     nested math)}\fi
  229. }
  230. \def\restglb@settings{%
  231.     \ifnum \tracingfonts>\thr@@
  232.         \@font@info{*** MATH: restoring}\fi
  233.       \begingroup
  234.         \let\f@size\curr@math@size
  235.         \ifx\glb@currsize \f@size
  236.     \ifnum \tracingfonts>\thr@@
  237.         \@font@info{*** MATH: ... already okay (\f@size)}\fi
  238.         \else
  239.     \ifnum \tracingfonts>\thr@@
  240.         \@font@info{*** MATH: ... to \f@size}\fi
  241.           \glb@settings
  242.         \fi
  243.       \endgroup
  244. }
  245. \def\use@mathgroup#1#2{\relax\ifmmode
  246.   \ifnum \tracingfonts>\tw@
  247.     \count@#2\relax
  248.     \@font@info{Using \noexpand\mathgroup
  249.              (\the\count@) #2}\fi
  250.      \math@bgroup
  251.          \expandafter\ifx\csname M@\f@encoding\endcsname#1\else
  252.          #1\fi
  253.          \mathgroup#2\relax
  254.      \expandafter\math@egroup\fi}%
  255.   \ifx\math@bgroup\bgroup
  256.     \def\math@egroup#1{#1\egroup
  257.       \ifnum \tracingfonts>\tw@
  258.      \@font@info{Restoring \noexpand\mathgroup
  259.         (\ifnum\mathgroup=\m@ne default\else \the\mathgroup \fi)%
  260.         }\fi}
  261.   \fi
  262. \def\getanddefine@fonts#1#2{%
  263.   \ifnum \tracingfonts>\tw@
  264.   \count@#1\relax
  265.     \@font@info{\noexpand\mathgroup (\the\count@) #1 :=\MessageBreak
  266.               \string#2 \tf@size/\sf@size/\ssf@size}\fi
  267.   \xdef\font@name{\csname \string#2/\tf@size\endcsname}%
  268.   \pickup@font \let\textfont@name\font@name
  269.   \xdef\font@name{\csname \string#2/\sf@size\endcsname}%
  270.   \pickup@font \let\scriptfont@name\font@name
  271.   \xdef\font@name{\csname \string#2/\ssf@size\endcsname}%
  272.   \pickup@font
  273.   \edef\math@fonts{\math@fonts
  274.                \textfont#1\textfont@name
  275.                \scriptfont#1\scriptfont@name
  276.                \scriptscriptfont#1\font@name}%
  277.     }
  278. \def\execute@size@function#1{%    %%% could be added to autoload as well
  279.          \@ifundefined{s@fct@#1}%
  280.            {\errmessage{Undefined font size function #1}%
  281.             \s@fct@}%
  282.            {\csname s@fct@#1\endcsname}%
  283. }
  284. \def\fontsubfuzz{0pt}
  285. \endinput
  286. %%
  287. %% End of file `tracefnt.sty'.
  288.